<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td width="350" valign="top">
    <?php
	$colname_tampil_member = "-1";
if (isset($_GET['user'])) {
  $colname_tampil_member = $_GET['user'];
}
mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_tampil_member = sprintf("SELECT * FROM memberdb WHERE nama_user = %s", GetSQLValueString($colname_tampil_member, "text"));
$tampil_member = mysql_query($query_tampil_member, $sepolwan_connect) or die(mysql_error());
$row_tampil_member = mysql_fetch_assoc($tampil_member);
$totalRows_tampil_member = mysql_num_rows($tampil_member);
	 if ( $totalRows_tampil_member > 0 ) { ?><div id="halaman">
<div style="width:50px; height:50px; float:left; overflow:hidden; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; margin-right:10px; margin-bottom:10px"><a href="<?php echo $row_tampil_member['nama_user'] ?>" target="_parent"><img src="<?php  if(file_exists("images/member/ava/".md5($row_tampil_member['id']).".jpg")) { echo $base."images/member/ava/tester_50_50_".md5($row_tampil_member['id']).".jpg"; } else { echo $base."images/member/ava/tester_50_50_default.jpg"; }  ?>" /></a> </div>
  <p><strong><a href="<?php echo $base.$row_tampil_member['nama_user'] ?>"><?php echo $row_tampil_member['full_name'] ?> </a></strong><br />

  <font size="-5" color="#999999"> (<?php echo $row_tampil_member['nama_user'] ?>)</font> </p>

   <div style="width:100%; height:1px; background:#CCC; margin-top:20px"></div>
      
    </div>
    <div style="padding:10px; background: #EFEFEF; border:1px solid #CCC;" align="center"><font size="-2" color="#999999"><a href="<?php echo $base.$row_tampil_member['nama_user'] ?>/following">Following(<?php mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_ceking = "SELECT * FROM ikut WHERE dari = $row_tampil_member[id] and ke = $row_tampil_member[id] ";
$ceking = mysql_query($query_ceking, $sepolwan_connect) or die(mysql_error());
$row_ceking = mysql_fetch_assoc($ceking);
$totalRows_ceking = mysql_num_rows($ceking);

if ($totalRows_ceking >0) { echo $totalRows_folowing-1; }  else { echo $totalRows_folowing; } 
mysql_free_result($ceking); ?>)</a> | <a href="<?php echo $base.$row_tampil_member['nama_user'] ?>/followers">Followers(<?php mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_ceking = "SELECT * FROM ikut WHERE dari = $row_tampil_member[id] and ke = $row_tampil_member[id] ";
$ceking = mysql_query($query_ceking, $sepolwan_connect) or die(mysql_error());
$row_ceking = mysql_fetch_assoc($ceking);
$totalRows_ceking = mysql_num_rows($ceking);

if ($totalRows_ceking >0) { echo $totalRows_folowers-1; }  else { echo $totalRows_folowers; } 
mysql_free_result($ceking); ?>)</a></font></div><div style="height:10px"></div><?php } ?>
<div id="halaman"><div class="jusul">New Member </div>
<?php 


mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_tl_user = "SELECT * FROM memberdb WHERE aktif = 'ya' and id <> '".$row_sesi_member['id']."' ORDER BY id DESC limit 6";
$tl_user = mysql_query($query_tl_user, $sepolwan_connect) or die(mysql_error());
$row_tl_user = mysql_fetch_assoc($tl_user);
$totalRows_tl_user = mysql_num_rows($tl_user);
do {
	mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_iring = "SELECT * FROM ikut WHERE dari = '".$row_sesi_member['id']."' AND ke = '".$row_tl_user['id']."'";
$iring = mysql_query($query_iring, $sepolwan_connect) or die(mysql_error());
$row_iring = mysql_fetch_assoc($iring);
$totalRows_iring = mysql_num_rows($iring);
?>
<div style="width:50px; height:50px; float:left; overflow:hidden; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; margin-right:10px; margin-bottom:10px"><a href="<?php echo $row_tl_user['nama_user'] ?>" target="_parent"><img src="<?php  if(file_exists("images/member/ava/".md5($row_tl_user['id']).".jpg")) { echo $base."images/member/ava/tester_50_50_".md5($row_tl_user['id']).".jpg"; } else { echo $base."images/member/ava/tester_50_50_default.jpg"; }  ?>" /></a> </div>
  <strong><a href="<?php echo $base.$row_tl_user['nama_user'] ?>"><?php echo $row_tl_user['full_name'] ?> </a></strong>
  <?php if ($row_tl_user['id']<>$row_sesi_member['id'] and $totalRows_iring==0) { ?><form <?php if($row_sesi_member['id']<>''){ ?> action="<?php echo $base ?>" <?php } else {?>  action="<?php echo $base."login.php" ?>"  <?php } ?> method="post" name="okikut" >
<input name="ke" type="hidden" value="<?php echo $row_tl_user['id'] ?>" />
<input name="okikut" type="submit" value="Follow" /></form> <?php } else if ($row_tl_user['id']<>$row_sesi_member['id'] and $totalRows_iring>0) {  ?>
<form action="<?php echo $base ?>" method="post" name="delikut" >
<input name="ke" type="hidden" value="<?php echo $row_tl_user['id'] ?>" />
<input name="delikut" type="submit" value="Following" style="background: #036; color: #FFF" /></form>
<?php } ?>
   <div style="width:100%; height:1px; background:#CCC; margin-top:20px"></div>

<?php mysql_free_result($iring); } while ($row_tl_user = mysql_fetch_array($tl_user)); mysql_free_result($tl_user);  ?>    </div>
 <div style="padding:10px; background: #EFEFEF; border:1px solid #CCC;" align="center"><font size="-2" color="#999999"><a href="<?php echo $base ?>halaman/people.html">Lihat Member lainya </a></font></div><div style="height:10px"></div>
<?php include "tambah/copy.php"; ?>
    </td>
    <td width="10"></td>
    <td width="590" valign="top" >

        
       <?php 



mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_tl_user = "SELECT * FROM dinding_tl WHERE id = '".$_GET['idart']."' and me = '".$row_tampil_member['id']."' ORDER BY id DESC";
$tl_user = mysql_query($query_tl_user, $sepolwan_connect) or die(mysql_error());
$row_tl_user = mysql_fetch_assoc($tl_user);
$totalRows_tl_user = mysql_num_rows($tl_user);

$colname_comentar_view = "-1";
if (isset($_GET['idart'])) {
  $colname_comentar_view = $_GET['idart'];
}
mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_comentar_view = sprintf("SELECT * FROM dinding_tl WHERE form = %s ORDER BY id ASC", GetSQLValueString($colname_comentar_view, "text"));
$comentar_view = mysql_query($query_comentar_view, $sepolwan_connect) or die(mysql_error());
$row_comentar_view = mysql_fetch_assoc($comentar_view);
$totalRows_comentar_view = mysql_num_rows($comentar_view);

?>
<?php if ($totalRows_tampil_member > 0) { // Show if recordset not empty ?>
 
  <?php } // Show if recordset not empty
  else { echo "<div align='center'><strong>Halaman Kosong</strong></div>";
  }
  
   ?>
<?php if ($row_tampil_member['email']==$_SESSION['MM_Username']) { ?><?php } ?>
<?php if ($totalRows_tl_user > 0) { // Show if recordset not empty ?>
  

        
        <div id="halaman">
        <?php if ($row_tl_user['judul']<>NULL) { ?><div class="jusul"><?php echo $row_tl_user['judul']; ?></div><?php } ?>
          
    <font style="text-justify: auto"><?php 
  
	  
		//echo $konten = str_replace(array("\r\n","\r","\n", "[img]", "[/img]", "[a]", "[/a]"), array("<br/>","<br/>","<br/>","<img src='","' style='max-width:500px' />", "<a href='", "' target='_blank'>&gt;&gt; Klik Disini &lt;&lt;</a>" ),$row_tl_user['isi']);// 
	echo
preg_replace('~@([^\s#@]+)~','<a href="http://geriloji.com/\1" target="_parent">$0</a>',
str_replace(array(":anger",":burn",":confused",":cool",":cry",":fire",":grimace",":love",":miao",":prettiness",":question",":shout",":slobber",":smile",":spook",":startle",":surprise",":sweat",":thirst",":vomit"), array("<img src='".$base."images/icon/anger.PNG' />","<img src='".$base."images/icon/burn.PNG' />","<img src='".$base."images/icon/confused.PNG' />","<img src='".$base."images/icon/cool.PNG' />","<img src='".$base."images/icon/cry.PNG' />","<img src='".$base."images/icon/fire.PNG' />","<img src='".$base."images/icon/grimace.PNG' />","<img src='".$base."images/icon/love.PNG' />","<img src='".$base."images/icon/miao.PNG' />","<img src='".$base."images/icon/prettiness.PNG' />","<img src='".$base."images/icon/question.PNG' />","<img src='".$base."images/icon/shout.PNG' />","<img src='".$base."images/icon/slobber.PNG' />","<img src='".$base."images/icon/smile.PNG' />","<img src='".$base."images/icon/spook.PNG' />","<img src='".$base."images/icon/startle.PNG' />","<img src='".$base."images/icon/surprise.PNG' />","<img src='".$base."images/icon/sweat.PNG' />","<img src='".$base."images/icon/thirst.PNG' />","<img src='".$base."images/icon/vomit.PNG' />"),
	str_replace(array("\r\n","\r","\n"), "<br />",
	preg_replace('/{img.*}(.*?){.*\/?img}/','<img src="\1" style="max-width:400px"/>',
	preg_replace('/{url.*}(.*?){.*\/?url}/','<a href="\1" target="_blank">\1</a>',
	preg_replace('/{b.*}(.*?){.*\/?b}/','<strong>\1</strong>',
	preg_replace('/{i.*}(.*?){.*\/?i}/','<i>\1</i>',
	preg_replace('/{youtube.*}(.*?){.*\/?youtube}/','<iframe width="400" height="280" src="//www.youtube.com/embed/\1" frameborder="0" allowfullscreen></iframe>',
	preg_replace('~#([^\s#@]+)~','<a href="search/\1">$0</a>', substr($row_tl_user['isi'], 0, 150))))))))));
  
  
   ?></font></p>
<font size="-5" color="#999999"><?php echo tgl_indo($row_tl_user['waktu']), substr($row_tl_user['waktu'], 10, 6), " WIB"; ?></font>    </p>
    
     <p> <div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=102070836579447";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script><div class="fb-like" data-href="<?php echo $base ?><?php  if ($row_tl_user['judul']<>"") {  
	echo $_GET['user']."/artikel/".$row_tl_user['id']."-".str_replace(array(' ', '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '{', '}', '|', ',', ':', ';', '"', '<', '>', ',', '.', '?', '/'), '-', $row_tl_user['judul']); 
	} else {
		echo $_GET['user']."/artikel/".$row_tl_user['id']."-post";
	}?>.html" data-send="true" data-width="595" data-show-faces="false" data-font="arial"></div></p>
    </div>
<div style="height:10px"></div>
        <div id="halaman"><div class="jusul">Komentar</div>
          <?php if ($totalRows_comentar_view > 0) { // Show if recordset not empty ?>
           <script>
 var aaa = jQuery.noConflict();
      aaa(function() {
    aaa('#mantion a').click(function(){

    var smiley = aaa(this).attr('title');
    aaa('#aaa').val(aaa('#aaa').val()+" "+smiley+" ");

    });
});
</script>
<div id="mantion">
  <?php do { 
		  
$colname_komen_member = "-1";
if (isset($row_comentar_view['me'])) {
  $colname_komen_member = $row_comentar_view['me'];
}
mysql_select_db($database_sepolwan_connect, $sepolwan_connect);
$query_komen_member = sprintf("SELECT * FROM memberdb WHERE id = %s", GetSQLValueString($colname_komen_member, "text"));
$komen_member = mysql_query($query_komen_member, $sepolwan_connect) or die(mysql_error());
$row_komen_member = mysql_fetch_assoc($komen_member);
$totalRows_komen_member = mysql_num_rows($komen_member);

		  ?>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="10%"><div style="width:50px; height:50px; overflow: hidden"><img src="<?php if ($row_komen_member['foto_profile']<>NULL) { if(file_exists("images/member/ava/".$row_komen_member['foto_profile'])) { echo "../../images/member/ava/".$row_komen_member['foto_profile']; } else { echo $base."images/member/ava/default_small.jpg"; } } else echo $base."images/member/ava/default_small.jpg"; ?>" width="50" ></div></td>
                <td width="1%"><div style="background: #036; width:2px; height:60px;"></div></td>
                <td width="89%"><div style="margin-left:10px; "><strong><a href="<?php echo $base ?><?php echo $row_komen_member['nama_user']; ?>"><?php echo $row_komen_member['full_name']; ?> ( <?php echo $row_komen_member['nama_user']; ?> )</a></strong><br /><font size="-5" color="#999999"><?php echo tgl_indo($row_comentar_view['waktu']), substr($row_comentar_view['waktu'], 10, 6), " WIB"; ?> |  <a style=" cursor:pointer" title="@<?php echo $row_komen_member['nama_user']; ?>">mention</a></font><br />
  <?php echo preg_replace('~@([^\s#@]+)~','<a href="http://geriloji.com/\1">$0</a>', $row_comentar_view['isi']); ?></div></td>
              </tr>
              <tr>
                <td colspan="3"><div style="background: #FFF2CA; width:100%; height:1px; margin-top:10px; margin-bottom:10px"></div></td>
              </tr>
            </table>
            <?php mysql_free_result($komen_member); } while ($row_comentar_view = mysql_fetch_assoc($comentar_view)); ?>
            </div>
            <?php } // Show if recordset not empty 
			else { echo "Belum Ada Komentar"; } ?>
        </div></p>
    <div id="halaman"><div class="jusul">Tuliskan Komentar</div>
   
    <?php if ($_SESSION['MM_Username']){ ?><form action="<?php
	
 echo curPageURL();  ?>" method="post" name="comentar_member" id="form1">
 
        
        <table width="100%" align="center">
          <tr valign="baseline">
            <td width="11%" align="left" valign="top" nowrap="nowrap"><div style="width:50px; height:50px; overflow: hidden"><img src="<?php echo $base ?>images/member/ava/<?php echo $row_sesi_member['foto_profile']; ?>" width="50" ></div></td>
            <td width="89%">
            <?php if ($_SESSION['MM_Username'] and $row_sesi_member['aktif']<>'ya') { ?><div style="width:100%; padding:5px; background:#F00; color:#FFF " align="center"><strong>Cek Email Anda Untuk Melakukan Aktifasi Akun</strong></div><?php } else { ?>
            <textarea name="komentar" cols="10" rows="5" id="aaa"  maxlength="255" style="width:99%; height:80px; resize:none"><?php if ($_GET['user']<>$row_sesi_member['nama_user']) { echo '@'.$_GET['user']; } ?> </textarea><br /><?php } ?></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">&nbsp;</td>
            <td><input type="submit" value="Kirimkan Komentar" /></td>
          </tr>
        </table>
        <input type="hidden" name="id" value="" />
        <input type="hidden" name="idfrom" value="<?php echo $row_tampil_member['id']; ?>" />
        <input type="hidden" name="notice" value="<?php echo $row_tampil_member['notice']+1; ?>" />
        <input type="hidden" name="MM_insert" value="comentar_member" />
    </form><?php } else {
	
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0) 
  $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  $MM_restrictGoTo;
echo "Anda harus <a href='../../login.php".$MM_restrictGoTo."'>login</a> untuk mengirimkan komentar"; } ?>
    </div>
    
  <?php } // Show if recordset not empty 
  ?>
  
<?php
mysql_free_result($tampil_member);

mysql_free_result($tl_user);
?>
</td>
  </tr>
</table>